# -*- coding: utf-8 -*-
"""
main
2025/9/3
@author: zhangzida
"""
import time
from data import Data
from Base.Base import Base
from selenium.webdriver.common.by import By
class Page(Base):

    # 点击登录
    login_loc=(By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a')
    # 输入用户名和密码
    username_loc=(By.XPATH,'/html/body/div[4]/div/div[1]/div[2]/form/div[1]/span[2]/input')
    password_loc=(By.XPATH,'/html/body/div[4]/div/div[1]/div[2]/form/div[2]/span[2]/input')
    # 点击登录按钮
    login1_loc=(By.XPATH,'/html/body/div[4]/div/div[1]/div[2]/form/div[5]/a')

    def login(self):
        self.click(self.login_loc)
    def username(self):
        self.send_keys(self.username_loc,'13811033962')
    def password(self):
        self.send_keys(self.password_loc,'123456')
    def login1(self):
        self.click(self.login1_loc)


    def luoji_sjk(self):
        self.open_url('http://10.59.9.14:7003/')
        # 点击登录
        self.login()
        time.sleep(2)
        # 输入用户名和密码
        self.username()
        self.password()
        # 强制等待输入验证码
        time.sleep(5)
        # 点击登录按钮
        self.login1()
        # 强制等待看效果
        time.sleep(3)
